import java.io.File;
import java.io.FileReader;

import org.apache.lucene.document.DateTools;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;

public class TrackDocument {
	
	
	
	public static Document TrackDocument(String title, String album, String artist)
	{
	 
   // make a new, empty document
		Document doc = new Document();

   // Add the path of the file as a field named "path".  Use a field that is 
   // indexed (i.e. searchable), but don't tokenize the field into words.
		doc.add(new Field("artist", artist, Field.Store.YES, Field.Index.TOKENIZED));
		doc.add(new Field("track", title, Field.Store.YES, Field.Index.TOKENIZED));
		doc.add(new Field("album", album, Field.Store.YES, Field.Index.TOKENIZED));
		


   // return the document
   return doc;
 }
	
	public static Document TrackDocument(String title, String album, String artist, String asin)
	{
		Document doc = new Document();

		if (asin==null) asin = "";
		
		   // Add the path of the file as a field named "path".  Use a field that is 
		   // indexed (i.e. searchable), but don't tokenize the field into words.
				doc.add(new Field("artist", artist, Field.Store.YES, Field.Index.TOKENIZED));
				doc.add(new Field("track", title, Field.Store.YES, Field.Index.TOKENIZED));
				doc.add(new Field("album", album, Field.Store.YES, Field.Index.TOKENIZED));
				

				doc.add(new Field("asin", asin, Field.Store.YES, Field.Index.NO));
				


		   // return the document
		   return doc;
		
		
	}


}
